import request from '@/utils/requist'

// 项目总览
export const Overview = () => {
  return request({
    method: 'get',
    url: '/api/project2/Overview',
    // urlType: 'api3'
  })
}
export const GetScore = () => {
  return request({
    method: 'get',
    url: '/api/project2/GetScore',
    // urlType: 'api3'
  })
}
export const UpgradeRemind = () => {
  return request({
    method: 'get',
    url: '/api/project2/UpgradeRemind',
    // urlType: 'api3'
  })
}
export const ProjectMap = ({
  district_name
}) => {
  return request({
    method: 'post',
    url: '/api/project2/ProjectMap',
    data: {
      district_name
    },
    // urlType: 'api3'
  })
}

// 统计分析
export const StatisticAnalysis = ({ district, flag }) => {
  return request({
    method: 'post',
    url: '/api/project2/StatisticAnalysis',
    data: {
      district,
      flag
    }
    // urlType: 'api3'
  })
}
export const ProjectAnalysis = ({
  flag,
  district,
  district_type
}) => {
  return request({
    method: 'post',
    url: '/api/project2/ProjectAnalysis',
    data: {
      flag,
      district,
      district_type
    },
    // urlType: 'api3'
  })
}


// 我的项目 、台账管理
// 下载模板
export const DownloadProjectTemplate = () => {
  return request({
    method: 'get',
    url: '/api/project2/DownloadProjectTemplate',
    // urlType: 'api3'
  })
}

// 导入文件
export const UploadProjectData = (file) => {
  return request({
    method: 'post',
    url: '/api/project2/UploadProjectData',
    data: file,
    // urlType: 'api3'
  })
}
// 导入文件
export const AddOrUpdate = ({
  add_project_list, update_project_list
}) => {
  return request({
    method: 'post',
    url: '/api/project2/AddOrUpdate',
    data: {
      add_project_list, update_project_list
    },
    // urlType: 'api3'
  })
}
// 查询列表
export const SearchProject = ({
  project_name,
  district,
  province,
  industry,
  schedule_node,
  is_importance,
  project_source,
  is_enter13710,
  schedule_condition,
  investment_condition,
  year,
  page,
  per_page,
}) => {
  return request({
    method: 'post',
    url: '/api/project2/SearchProject',
    data: {
      project_name,
      district,
      province,
      industry,
      schedule_node,
      is_importance,
      project_source,
      is_enter13710,
      schedule_condition,
      investment_condition,
      year,
      page,
      per_page,
    },
    // urlType: 'api3'

  })
}
// 导出筛选结果项目
export const BatchExportProject = ({ select_id_list }) => {
  return request({
    method: 'post',
    url: '/api/project2/BatchExportProject',
    data: {
      select_id_list
    },
    // urlType: 'api3'

  })
}
// 审核筛选结果未审核项目
export const BatchAudit = ({
  audit_flag,
  audit_id_list,
  audit_message,
}) => {
  return request({
    method: 'post',
    url: '/api/project2/BatchAudit',
    data: {
      audit_flag,
      audit_id_list,
      audit_message,
    },
    // urlType: 'api3'

  })
}
// 删除项目
export const BatchDelete = ({
  delete_id_list,
}) => {
  return request({
    method: 'post',
    url: '/api/project2/BatchDelete',
    data: {
      delete_id_list,
    },
    // urlType: 'api3'
  })
}




// 项目档案

export const CheckProjectDetail = ({
  project_id,
}) => {
  return request({
    method: 'post',
    url: '/api/project2/CheckProjectDetail',
    data: {
      project_id,
    },
    // urlType: 'api3'
  })
}

export const ProjectEdit = (form) => {
  return request({
    method: 'post',
    url: '/api/project2/ProjectEdit',
    data: form,
    // urlType: 'api3',
  })
}
export const FileDelete = ({
  project_id,
  file_type,
  file_id
}) => {
  return request({
    method: 'post',
    url: '/api/project2/FileDelete',
    data: {
      project_id,
      file_type,
      file_id
    },
    // urlType: 'api3',
  })
}
export const ScheduleRemind = ({
  project_id,
  scheduling_condition,
  supervised_remind
}) => {
  return request({
    method: 'post',
    url: '/api/project2/ScheduleRemind',
    data: {
      project_id,
      scheduling_condition,
      supervised_remind
    },
    // urlType: 'api3'
  })
}
export const GetDynamicLog = ({
  project_id,
  page,
  per_page
}) => {
  return request({
    method: 'post',
    url: '/api/project2/GetDynamicLog',
    data: {
      project_id,
      page,
      per_page
    },
    // urlType: 'api3'
  })
}
export const DownloadFile = ({
  project_id,
}) => {
  return request({
    method: 'post',
    url: '/api/project2/DownloadFile',
    data: {
      project_id,
    },
    // urlType: 'api3'
  })
}
